package com.carkeeper.tweet.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @program: carkeeper_parent
 * @Date: 2020/11/23 14:36
 * @Author: qgg
 * @Description:
 */

/**
 * 推文实体类
 */
@Table(name = "tb_tweet")
@Document(indexName = "tweet" , type = "docs")
public class Tweet implements Serializable {

    //id
    @Id
    @Field(index = true,store = true,type = FieldType.Keyword)
    private Long id;

    //推文名称
    @Field(index = true,store = true,type = FieldType.Text,analyzer = "ik_max_word")
    private String name;

    //图片
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String image;

    //内容附加图片，多个已逗号分隔
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String images;

    //总体分类名称
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String type;

    //一级分类id
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "type01_id")
    private String type01Id;

    //二级分类id
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "type02_id")
    private String type02Id;


    //一级分类名称
    @Column(name = "type01_name")
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String type01Name;


    //二级分类名称
    @Column(name = "type02_name")
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String type02Name;


    //推文内容
    @Field(index = true,store = true,type = FieldType.Text)
    private String content;


    //创建时间
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "create_time")
    private String createTime;


    //修改时间
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "update_time")
    private String updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType01Id() {
        return type01Id;
    }

    public void setType01Id(String type01Id) {
        this.type01Id = type01Id;
    }

    public String getType02Id() {
        return type02Id;
    }

    public void setType02Id(String type02Id) {
        this.type02Id = type02Id;
    }

    public String getType01Name() {
        return type01Name;
    }

    public void setType01Name(String type01Name) {
        this.type01Name = type01Name;
    }

    public String getType02Name() {
        return type02Name;
    }

    public void setType02Name(String type02Name) {
        this.type02Name = type02Name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}